<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>history1</title>
</head>
<body>
    <a href="history对象2.html">链接一个页面</a>
    <button id="right">下一个</button>
    <button id="record">几条记录</button>
</body>
</html>
<script>
    var right = document.getElementById("right");
    var record = document.getElementById("record");
    right.onclick=function(){
        history.forward();//下一个
    }
    record.onclick=function () {
        alert(history.length);//一共有几条记录

    }

</script>